<template>
  <span style="display: none;"></span>
</template>
<script setup lang="ts">
import { useUserInfoStore } from "@/store/useUserInfoStore";
import { useRouter } from 'vue-router';
const router = useRouter();
const userInfoStore = useUserInfoStore();
import { watch } from 'vue'

watch(
  () => userInfoStore.$state.toLogin,
  (toLogin) => {
    if (toLogin) {
      router.push('/login');
    }
  },
  { immediate: true }
);

</script>
<style scoped>
/* 样式可以根据需要添加 */
</style>
